package com.ssr.master.common.config;

import com.ssr.master.common.interceptor.PathInterceptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

/**
 * @author ZhangPeng
 * @Description //todo 注册第一步中自定义的拦截器
 * @date
 * @updateBy
 * @other
 **/
@Configuration
public class PathInterceptorConfig extends WebMvcConfigurerAdapter {

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(new PathInterceptor()).addPathPatterns("/**");
    }
}